package com.kld.bi.service.impl;

import com.kld.bi.api.ICmsHomeService;
import com.kld.bi.dao.CmsHomeDao;
import com.kld.bi.po.CmsHome;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.interceptor.TransactionAspectSupport;

/**
 * Created by anpushang on 2016/3/23.
 */
@Service
public class CmsHomeServiceImpl implements ICmsHomeService {

    @Autowired
    private CmsHomeDao cmsHomeDao;


    @Override
    public int deleteByPrimaryKey(Integer brandIndexId)throws Exception{
        /*try{
           *//* ForumCircle forumCircle = new ForumCircle();
            forumCircle.setContent("1111");*//*
            //forumCircleService.saveForumCircle(forumCircle);
            cmsHomeDao.delete(brandIndexId);
            int i = 1/0;
        }catch (Exception e){
            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
        }*/
        cmsHomeDao.delete(brandIndexId);
        int i = 1/0;
        return 0;
    }


}
